package net.wanho.study.dao;

import net.wanho.study.dto.UserDTO;
import net.wanho.study.entity.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;
import java.util.Objects;

/**
 * Author：汤小洋
 * Date：2023-12-08 16:32
 * Description：<描述>
 */
public interface UserDao {
    /**
     * 添加用户
     */
    void insertUser(User user);

    void updateUser(User user);

    void deleteById(Integer id);

    User selectById(Integer id);

    List<User> selectAll();

    List<User> selectByUsername(String username);

    User selectById2(Integer id);

    User selectById3(Integer id);

    User selectByUsernameAndPassword(@Param("username") String username,@Param("password") String password);

    User selectByUsernameAndPassword2(UserDTO userDTO);

    User selectByUsernameAndPassword3(Map<String, Object> params);

    List<User> selectOrder(@Param("column") String column,@Param("order") String order);

    List<User> selectByParams(User user);

    List<User> selectByParams2(User user);

    List<User> selectByParams3(User user);

    void updateUser2(User user);

    void insertUser2(User user);

    List<User> selectByIds(List<Integer> ids);

    void insertBatch(List<User> users);

    void deleteByUsername(String name);

}
